package design.structure.适配;

/**
 * 适配器模式
 * @version 2017/4/21 0021 下午 4:21
 */
public class Adapter implements Target {
    private Adaptee adaptee;

    public Adapter(Adaptee adaptee) {
        this.adaptee = adaptee;
    }

    @Override
    public void method1() {
        adaptee.method1();
    }

    @Override
    public void method2() {
        System.out.println(" 正常实现方法");
    }

    public static void main(String[] args) {
        Target target = new Adapter(new Adaptee());
        target.method1();
        target.method2();
    }
}
